package com.atguigu.gmall.logger.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: kaiyi
 * @Date 2021/10/30 17:35
 */
@Slf4j
@RestController
public class LoggerController {

    @RequestMapping("/applog")
    public String log(@RequestBody String LogInfo){
        log.info(LogInfo);
        return LogInfo;
    }


    @RequestMapping("testDemo")
    public String testDemo(@RequestParam("log") String LogInfo){

        return LogInfo;
    }

    @RequestMapping("testDemoBody")
    public String testDemoBody(@RequestBody String LogInfo){

        return LogInfo;
    }


}
